<?php $left_width=360; ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
	<title></title>

	<script src="{:jquery}"></script>
	<link href="{:bootstrap_min_css}" rel="stylesheet">
	<script src="{:bootstrap_min_js}"></script>

	<!--[if lt IE 9]>
	<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/ie8/videojs-ie8.js"></script>
	<![endif]-->


	<link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.3.0/tcplayer.min.css" rel="stylesheet"/>
	<!--如果需要在 Chrome 和 Firefox 等现代浏览器中通过 H5 播放 HLS 格式的视频，需要在 tcplayer.vx.x.x.min.js 之前引入 hls.min.x.xx.xm.js。-->
	<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.3.0/libs/hls.min.0.13.2m.js"></script>
	<!--播放器脚本文件-->
	<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.3.0/tcplayer.v4.3.0.min.js"></script>

	<link type="text/css" rel="stylesheet" href="/static/ckplayer/css/ckplayer.css" />
	<script type="text/javascript" src="/static/ckplayer/js/ckplayer.min.js" charset="UTF-8"></script>


	<style>
		html,body{
			margin: 0;
			padding: 0;
		}

	</style>
</head>
<body>

<div>

</div>

<script>
	/*(function(){
		var player = new TCPlayer('id_test_video', { // player-container-id 为播放器容器 ID，必须与 html 中一致
			//fileID: '387702293559253378', // 请传入需要播放的视频 fileID（必须）
			//appID: '1252460838', // 请传入点播账号的 appID（必须）
			//width:'100%',
			//height:'100%',
			//"m3u8": "http://1252460838.vod2.myqcloud.com/270b0551vodtranscq1252460838/eff94cbd387702293559253378/v.f100230.m3u8",
			//"poster" : "http://www.test.com/myimage.jpg",
		});


		function play(lessionId) {
			//获取课时的视频路径
			$.post('/lesson/video/url',{lessionId:lessionId},function (ret) {
				//player.src(data.url);
				ret = JSON.parse(ret);
				console.log(ret);
				if (ret.code == 0) {
					player.src(ret.url);
				}
			});

		}

		play('{$lesson.id}');

	})();*/
	$(function () {
		function resizePlayerBox() {
			var pw = $('#video-box');
			//pw.height(pw.width() / 16 * 9);
			var h = $(window).height()-240;
			console.log('h='+h)
			pw.height(h);
			console.log(pw.width())
			if ($(window).width() < 960) {

				pw.height($(window).width()*0.562);
				$('.sb-list').css('top', pw.height() + 60);
			}else{
				$('.sb-list').css('top', '0');
			}

		}
		$(window).resize(resizePlayerBox);
		$(window).resize();
	});
</script>
</body>
</html>
